import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Index from "../components/common/Index.vue"
import Query from "../components/common/Query.vue"
import Personal from "../components/common/Personal.vue"
import Tabbar from "../components/common/Tabbar.vue"
// 记账页
import MaterialDonation from "../components/lists/MaterialDonation.vue"
import MaterialDonationA from "../components/lists/MaterialDonationA.vue"
import Contribution from "../components/lists/Contribution.vue"
import InStorage from "../components/lists/InStorage.vue"
import InStorageA from "../components/lists/InStorageA.vue"
import OutStorage from "../components/lists/OutStorage.vue"
import OutStorageA from "../components/lists/OutStorageA.vue"
import ReceiveMaterial from "../components/lists/ReceiveMaterial.vue"
import DemandMaterials from "../components/lists/DemandMaterials.vue"
import PurchaseMaterials from "../components/lists/PurchaseMaterials.vue"
import ProductionPlan from "../components/lists/ProductionPlan.vue"
import ProductStorage from "../components/lists/ProductStorage.vue"
import SalesOutlet from "../components/lists/SalesOutlet.vue"
import LogisticsCompany from "../components/lists/LogisticsCompany.vue"
// 查询页
import QMaterialDonation from "../components/QueryList/QMaterialDonation.vue"
import QContribution from "../components/QueryList/QContribution.vue"
import QInStorage from "../components/QueryList/QInStorage.vue"
import QOutStorage from "../components/QueryList/QOutStorage.vue"
import QReceiveMaterial from "../components/QueryList/QReceiveMaterial.vue"
import QDemandMaterials from "../components/QueryList/QDemandMaterials.vue"
import QPurchaseMaterials from "../components/QueryList/QPurchaseMaterials.vue"
import QProductionPlan from "../components/QueryList/QProductionPlan.vue"
import QProductStorage from "../components/QueryList/QProductStorage.vue"
import QSalesOutlet from "../components/QueryList/QSalesOutlet.vue"
import QLogisticsCompany from "../components/QueryList/QLogisticsCompany.vue"


Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  { path: '/Index', name: 'Index', component: Index },
  { path: '/Query', name: 'Query', component: Query, meta: { keepAlive: true } },
  { path: '/Personal', name: 'Personal', component: Personal, meta: { keepAlive: true } },
  { path: '/Tabbar', name: 'Tabbar', component: Tabbar },
  // 记账页
  { path: '/MaterialDonation', name: "MaterialDonation", component: MaterialDonation },
  { path: '/MaterialDonationA', name: "MaterialDonationA", component: MaterialDonationA },
  { path: '/Contribution', name: "Contribution", component: Contribution },
  { path: '/InStorage', name: "InStorage", component: InStorage },
  { path: '/InStorageA', name: "InStorageA", component: InStorageA },
  { path: '/OutStorage', name: "OutStorage", component: OutStorage },
  { path: '/OutStorageA', name: "OutStorageA", component: OutStorageA },
  { path: '/ReceiveMaterial', name: "ReceiveMaterial", component: ReceiveMaterial },
  { path: '/DemandMaterials', name: "DemandMaterials", component: DemandMaterials },
  { path: '/PurchaseMaterials', name: "PurchaseMaterials", component: PurchaseMaterials },
  { path: '/ProductionPlan', name: "ProductionPlan", component: ProductionPlan },
  { path: '/ProductStorage', name: "ProductStorage", component: ProductStorage },
  { path: '/SalesOutlet', name: "SalesOutlet", component: SalesOutlet },
  { path: '/LogisticsCompany', name: "LogisticsCompany", component: LogisticsCompany },
  // 查询页
  { path: '/QMaterialDonation', name: "QMaterialDonation", component: QMaterialDonation },
  { path: '/QContribution', name: "QContribution", component: QContribution },
  { path: '/QInStorage', name: "QInStorage", component: QInStorage },
  { path: '/QOutStorage', name: "QOutStorage", component: QOutStorage },
  { path: '/QReceiveMaterial', name: "QReceiveMaterial", component: QReceiveMaterial },
  { path: '/QDemandMaterials', name: "QDemandMaterials", component: QDemandMaterials },
  { path: '/QPurchaseMaterials', name: "QPurchaseMaterials", component: QPurchaseMaterials },
  { path: '/QProductionPlan', name: "QProductionPlan", component: QProductionPlan },
  { path: '/QProductStorage', name: "QProductStorage", component: QProductStorage },
  { path: '/QSalesOutlet', name: "QSalesOutlet", component: QSalesOutlet },
  { path: '/QLogisticsCompany', name: "QLogisticsCompany", component: QLogisticsCompany },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router